package com.sikao.app;

import android.app.Application;
import android.test.ApplicationTestCase;

import com.google.gson.Gson;
import com.sikao.app.bean.CategoryAttrBean;
import com.sikao.app.bean.CategoryAttrForInviteBean;
import com.sikao.app.bean.CategoryAttrNewBean;
import com.sikao.app.net.BaseCallback;
import com.sikao.app.utils.Utils;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;


/**
 * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
 */
public class ApplicationTest extends ApplicationTestCase<Application> {
	public ApplicationTest() {
		super(Application.class);
		String resultStr="{\"status\":1,\"msg\":\"成功进行操作\",\"res\":{\"releaseAttr\":false,\"goodsAttrs\":[],\"attr\":[{\"id\":\"12\",\"name\":\"库存\",\"en_name\":\"Stock\",\"attr_type\":\"3\",\"attr_values\":[{\"id\":0,\"value\":\"0-100\",\"changePrice\":\"0.00\",\"isUse\":false,\"isDefault\":false},{\"id\":1,\"value\":\"100-500\",\"changePrice\":\"0.00\",\"isUse\":false,\"isDefault\":false},{\"id\":2,\"value\":\"500-1000\",\"changePrice\":\"0.00\",\"isUse\":false,\"isDefault\":false},{\"id\":3,\"value\":\">1000\",\"changePrice\":\"0.00\",\"isUse\":false,\"isDefault\":false}],\"default_value\":[],\"is_filter\":\"1\",\"show_position\":\"main\",\"search_flag\":\"number\",\"is_show\":\"0\",\"order\":\"101\",\"status\":\"0\"},{\"id\":\"1\",\"name\":\"包装方式\",\"en_name\":\"pack\",\"attr_type\":\"1\",\"attr_values\":[{\"id\":0,\"value\":\"散装\",\"changePrice\":\"0.00\",\"isUse\":false,\"isDefault\":false}],\"default_value\":[],\"is_filter\":\"0\",\"show_position\":\"main\",\"search_flag\":\"none\",\"is_show\":\"1\",\"order\":\"100\",\"status\":\"0\"},{\"id\":\"2\",\"name\":\"含水量\",\"en_name\":\"water_content\",\"attr_type\":\"3\",\"attr_values\":[{\"id\":0,\"value\":\"5%\",\"changePrice\":\"0.00\",\"isUse\":true,\"isDefault\":true},{\"id\":1,\"value\":\"7%\",\"changePrice\":\"0.00\",\"isUse\":false,\"isDefault\":false},{\"id\":2,\"value\":\"10%\",\"changePrice\":\"0.00\",\"isUse\":false,\"isDefault\":false},{\"id\":3,\"value\":\"15%\",\"changePrice\":\"0.00\",\"isUse\":false,\"isDefault\":false},{\"id\":4,\"value\":\"20%\",\"changePrice\":\"0.00\",\"isUse\":false,\"isDefault\":false}],\"default_value\":[{\"id\":0,\"value\":\"5%\",\"changePrice\":\"0.00\",\"isUse\":true,\"isDefault\":true}],\"is_filter\":\"0\",\"show_position\":\"main\",\"search_flag\":\"none\",\"is_show\":\"1\",\"order\":\"100\",\"status\":\"0\"},{\"id\":\"6\",\"name\":\"功率\",\"en_name\":\"power\",\"attr_type\":\"3\",\"attr_values\":[{\"id\":0,\"value\":\"1kw\",\"changePrice\":\"0.00\",\"isUse\":false,\"isDefault\":false},{\"id\":1,\"value\":\"2kw\",\"changePrice\":\"0.00\",\"isUse\":true,\"isDefault\":true},{\"id\":2,\"value\":\"5kw\",\"changePrice\":\"0.00\",\"isUse\":false,\"isDefault\":false},{\"id\":3,\"value\":\"10kw\",\"changePrice\":\"0.00\",\"isUse\":false,\"isDefault\":false}],\"default_value\":[{\"id\":1,\"value\":\"2kw\",\"changePrice\":\"0.00\",\"isUse\":true,\"isDefault\":true}],\"is_filter\":\"0\",\"show_position\":\"main\",\"search_flag\":\"none\",\"is_show\":\"1\",\"order\":\"100\",\"status\":\"0\"},{\"id\":\"8\",\"name\":\"下拉测试\",\"en_name\":\"select_test\",\"attr_type\":\"5\",\"attr_values\":[{\"id\":0,\"value\":\"下拉测试1\",\"changePrice\":\"0.00\",\"isUse\":false,\"isDefault\":false},{\"id\":1,\"value\":\"下拉测试2\",\"changePrice\":\"0.00\",\"isUse\":false,\"isDefault\":false},{\"id\":2,\"value\":\"下拉测试3\",\"changePrice\":\"0.00\",\"isUse\":false,\"isDefault\":false}],\"default_value\":[],\"is_filter\":\"0\",\"show_position\":\"main\",\"search_flag\":\"none\",\"is_show\":\"1\",\"order\":\"100\",\"status\":\"0\"}],\"profilePic\":\"\",\"profilePicPath\":\"\"}}";
		Gson mGson=new Gson();
		CategoryAttrBean obj = mGson.fromJson(resultStr,CategoryAttrBean.class );

		System.out.println("pic============================="+obj.getMsg());


	}
}